package com.xzy.cinematicket.service.impl;

import java.util.List;

import com.xzy.cinematicket.dao.IMovieDao;
import com.xzy.cinematicket.dao.impl.MovieDaoImpl;
import com.xzy.cinematicket.entity.Movie;
import com.xzy.cinematicket.entity.PageBean;
import com.xzy.cinematicket.service.IMovieService;

/**
 * @author yihuan.Zhou
 *
 * @Date 上午10:50:45
 */
public class MovieServiceImpl implements IMovieService{
	IMovieDao movieDao = new MovieDaoImpl();
	//根据名字查询影片
	@Override
	public List<Movie> selectByName(String name) {
		return movieDao.selectByName(name);
	}
	@Override
	public List<Movie> selectAll() {
		return movieDao.selectAll();
	}
	public Movie addAndfind(Object params[]){
		return movieDao.insertAndSelect(params);
	}
	@Override
	public List<Movie> getPageList(PageBean<Movie> page) {
		return movieDao.getPageList(page);
	}
	@Override
	public Movie selectById(int id) {
		return movieDao.selectById(id);
	}
}
